The following example searches for the first occurrence of a digit in an input string. If a digit is found, it returns its position, otherwise it returns
Local StringVar inString := "The 7 Dwarves"; Local NumberVar strLen := Length (inString); Local NumberVar result :=-1 ; Local NumberVar i := 1; While i <= strLen And result =-1 Do ( Local StringVar c := inString [i]; If NumericText (c) Then result := i; i := i + 1; ); result
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |